Skip to content

Implementation Plan: Remediation — source-dir-enforcement-seam Part A#4201

Merged
Trecek merged 7 commits into
developfrom
codex-orchestrator-fills-source-dir-with-github-url-fleet-di/4200
Jul 7, 2026
Merged

Implementation Plan: Remediation — source-dir-enforcement-seam Part A#4201
Trecek merged 7 commits into
developfrom
codex-orchestrator-fills-source-dir-with-github-url-fleet-di/4200

Conversation

@Trecek

@Trecek Trecek commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

Two concrete code defects were left behind by the prior implementation round and are cited in the remediation audit:

  1. REQ-004 — unauthorized fourth branch: apply_config_authoritative_overrides in src/autoskillit/config/ingredient_defaults.py contains a fourth elif key not in CONFIG_AUTHORITY_KEYS: logger.warning(...) branch that the plan never authorized. The plan specifies exactly three branches: SERVER_AUTHORITATIVE_INGREDIENTS, BACKEND_CAPABILITY_INGREDIENTS, and an implicit else (caller-sovereign). The fourth branch must be removed so the loop body matches the specified three-branch structure.

  2. REQ-009 — weak T2 assertion: The T2 test test_apply_config_authoritative_overrides_source_dir_not_injected_when_absent uses captured["ingredients"].get("source_dir") != URL — a weaker assertion that passes if source_dir is present with any non-URL value (e.g., the empty string "" injected by execute_dispatch when the caller omits the ingredient and the recipe defines default=""). The test must assert "source_dir" not in result against the output of apply_config_authoritative_overrides directly, bypassing the execute_dispatch default-injection path.

Both changes are in the same commit to satisfy the green-gate invariant (the T2 test must pass after the function fix, and the function fix changes the behavior T2 validates).

Part B (introducing CALLER_SOVEREIGN_INGREDIENTS, tightening config-authority-requires-resolve-source, removing authority: config from 15 recipe YAMLs) is a separate task and must NOT be implemented here.

Closes #4200

Implementation Plan

Plan file: /home/talon/projects/autoskillit-runs/remediation-20260707-023904-630849/.autoskillit/temp/make-plan/remediation_source-dir-enforcement-seam-part-a_plan_2026-07-07_035458.md

🤖 Generated with Claude Code via AutoSkillit

Token Usage Summary

Step Model count uncached output cache_read peak_ctx turns cache_write time
investigate* fable 1 8.9k 34.4k 769.5k 126.2k 27 136.5k 24m 45s
rectify* sonnet 1 219 38.1k 2.1M 118.9k 72 119.6k 20m 17s
dry_walkthrough* sonnet 2 1.7k 24.8k 924.2k 61.7k 54 85.0k 10m 12s
implement* sonnet 2 290 18.8k 1.8M 77.2k 87 96.3k 8m 32s
assess* sonnet 3 354 23.0k 2.0M 66.4k 108 118.0k 15m 5s
audit_impl* sonnet 2 194 45.7k 1.0M 72.0k 65 108.0k 16m 16s
make_plan* sonnet 1 103 10.0k 577.4k 63.8k 30 49.4k 3m 17s
prepare_pr* MiniMax-M3 1 42.2k 2.6k 153.7k 44.1k 12 0 43s
compose_pr* MiniMax-M3 1 35.7k 2.5k 182.9k 0 13 0 37s
review_pr* sonnet 1 156 25.6k 1.1M 79.7k 48 61.6k 7m 7s
resolve_review* sonnet 1 239 11.3k 1.7M 75.0k 74 56.9k 6m 18s
Total 90.0k 236.8k 12.4M 126.2k 831.4k 1h 53m

* Step used a non-Anthropic provider; caching behavior may differ.

Token Efficiency

Step LoC Changed cache_read/LoC cache_write/LoC output/LoC
investigate 0
rectify 0
dry_walkthrough 0
implement 250 7150.7 385.4 75.0
assess 66 30170.3 1787.4 349.0
audit_impl 0
make_plan 0
prepare_pr 0
compose_pr 0
review_pr 0
resolve_review 28 61901.3 2033.9 402.1
Total 344 35996.1 2416.9 688.4

Model Usage Breakdown

Model steps uncached output cache_read cache_write time
fable 1 8.9k 34.4k 769.5k 136.5k 24m 45s
sonnet 8 3.2k 197.3k 11.3M 694.9k 1h 27m
MiniMax-M3 2 77.9k 5.1k 336.6k 0 1m 20s

Trecek and others added 7 commits July 7, 2026 03:32
…NGREDIENTS discriminator

The fleet dispatch path (apply_config_authoritative_overrides) was using
`ing.authority == "config"` as its discriminator — the same as the recipe
schema annotation — which is too broad. This caused source_dir to be silently
replaced with the git remote URL from resolve_ingredient_defaults, killing
bootstrap_clone within 90 seconds of any fleet dispatch on a recipe that
declared source_dir with authority: config.

- Change A2: Import BACKEND_CAPABILITY_INGREDIENTS from autoskillit.core
- Change A1: Replace the monolithic overwrite loop with a three-branch
  structure using the correct discriminator for each key class:
  SERVER_AUTHORITATIVE_INGREDIENTS (server-owned), BACKEND_CAPABILITY_INGREDIENTS
  (backend-owned), and the implicit caller-sovereign branch (no-op for source_dir)
- Change A3 + T1-T3: Add three new tests exposing the bug (source_dir
  preservation, no URL injection when absent, only-mutates-enforcement-keys
  contract), and update the existing masking test to assert the corrected
  behavior instead of validating the injection bug

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…havior

The fourth elif branch (key not in CONFIG_AUTHORITY_KEYS → warning) was
removed in the prior commit restoring the three-branch structure. Two
tests verified that warning behavior and now fail. Update them to assert
only the correct three-branch behavior: unknown caller-sovereign keys are
retained silently without a warning.
…ient branch

The BACKEND_CAPABILITY_INGREDIENTS warning log was identical to the
SERVER_AUTHORITATIVE_INGREDIENTS warning, making it impossible for log
consumers to distinguish which branch fired. Use a branch-specific message.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…it test

The test docstring stated the key is retained silently (no warning), but no
assertion verified this contract. Add structlog.testing.capture_logs() and
a negative assertion to guard against regression to warn-on-unknown behavior.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ync integration test

The test docstring stated the caller-sovereign path emits no warning, but the
test dropped the prior warning assertion without adding an explicit no-warning
check. Add structlog.testing.capture_logs() and a negative assertion to prevent
regression to the old warn-on-unknown behavior.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Trecek Trecek added this pull request to the merge queue Jul 7, 2026
Merged via the queue into develop with commit 46519ee Jul 7, 2026
3 checks passed
@Trecek Trecek deleted the codex-orchestrator-fills-source-dir-with-github-url-fleet-di/4200 branch July 7, 2026 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant